package com.lions.client.view.statspanel;

import com.google.gwt.user.client.ui.FlexTable;
import com.lions.client.model.Model;
import com.lions.client.model.Type;

/**
 * Table displaying the number of modules that you
 * currently know the location of.
 * @author Brad
 *
 */
public class StatsPanel extends FlexTable {

	/**
	 * Constructor for the StatsPanel
	 * @param m Model that holds a list of modules
	 */
	public StatsPanel(Model m) {

		initComponents();
	}

	/**
	 * Initializes the table displaying the number of modules that you
	 * currently know the location of.
	 */
	public void initComponents() {
		setText(0, 0, Type.AIRLOCK.toString());
		setText(0, 1, Type.CANTEEN.toString());
		setText(0, 2, Type.PLAIN.toString());
		setText(0, 3, Type.CONTROL.toString());
		setText(0, 4, Type.DORMITORY.toString());
		setText(0, 5, Type.FOOD_WATER_STORAGE.toString().substring(11));
		setText(0, 6, Type.GYM.toString());
		setText(0, 7, Type.MEDICAL.toString());
		setText(0, 8, Type.POWER.toString());
		setText(0, 9, Type.SANITATION.toString());

		setCellPadding(1);

		getRowFormatter().addStyleName(0, "watchListHeader");
		addStyleName("watchList");
		getCellFormatter().addStyleName(0, 1, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 2, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 3, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 4, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 5, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 6, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 7, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 8, "watchListNumericColumn");
		getCellFormatter().addStyleName(0, 9, "watchListNumericColumn");
		// getCellFormatter().addStyleName(0, 10, "watchListNumericColumn");

		setBorderWidth(1);

	}
}
